<?php
namespace Home\Controller;
use Utuo\ForegroundController;
class LostFoundController extends ForegroundController
{  
	
 	public function _init() {
		
		layout(false);
	} 
	
	
	public function indexAction(){
		$sid=I('sid',0,'intval');
		$this->assign("sid",$sid);
	    $this->display();
	}
	public function publishAction(){
		C('TOKEN_ON',false);
		$this->display();
	}
	public function addAction(){
		C('TOKEN_ON',false);
		$m=D('LostFound');
	     if($m->create())
	     {
		$m->add()?$this->ajaxReturn(array('state'=>1,'msg'=>'您的小纸条已经发布成功')):$this->ajaxReturn(array('state'=>0,'msg'=>'发布失败'));
	     }else{
	     	echo $m->getError();
	     }
	}
	/* public function getCurrentContentAction(){
		$condations=array(
				'is_deleted'=>0,
				'status'=>1
		);
		$m=D('LostFound');
		$lists=$m->where($condations)->page($this->getPage(),$this->getPageSize())->order('id desc')->select();
		//echo M()->getLastSql();
		$this->ajaxReturn($lists);
	}  */
	
}